package com.ama.service.impl;

import com.ama.dao.PropertyDao;
import com.ama.pojo.Property;
import com.ama.service.PropertyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class PropertyServiceImpl implements PropertyService {
    @Autowired
    private PropertyDao propertyDao;

    @Override
    public int deleteById(Long propertyId) {
        return propertyDao.deleteByPrimaryKey(propertyId);
    }

    @Override
    public int insertProperty(Property property) {
        return propertyDao.insertProperty(property);
    }

    @Override
    public int insertSelective(Property property) {
        return propertyDao.insertSelective(property);
    }

    @Override
    public Property selectById(Long propertyId) {
        return propertyDao.selectByPrimaryKey(propertyId);
    }

    @Override
    public Property selectByIdAndPassword(Long propertyId, String password) {
        return propertyDao.selectByIdAndPassword(propertyId,password);
    }

    @Override
    public int updateByIdSelective(Property property) {
        return propertyDao.updateByPrimaryKeySelective(property);
    }

    @Override
    public int updateById(Property property) {
        return propertyDao.updateByPrimaryKey(property);
    }
}
